package tang.server;

/**
 * @author Tang
 * @classname Follower
 * @description [  ]
 * @date 2021/3/7 11:29
 */
public class Follower extends Learner{

    public void followerLeader() {

        // 找到leader机器
        int leaderServer = findLeader();

        // 连接 leader
        connectToLeader();

        // 同步最新的事务id
        int newEpochZxid = registerWithLeader();

        // 数据同步，，启动当前服务器
        syncWithLeader(newEpochZxid);

    }

    private int registerWithLeader() {
        return 0;
    }

    private void connectToLeader() {

    }

    private int findLeader() {
        return 0;
    }
}